This application is related to U.S. patent application Ser. No. 08/725,656 filed simultaneously by Karim El Malki, entitled "SILENCE-IMPROVED ECHO CANCELLER" and incorporated herein by reference.
1. Field of Invention
This invention pertains to speech and acoustic signal processing, and particularly to a determination of echo path delay and operation of echo cancellers.
2. Related Art and Other Considerations
Echo cancellers are widely used both in terrestrial and atmospheric (i.e. radio, microwave) communication to eliminate the "echo" phenomenon which greatly affects the quality of speech and audio services. An echo canceller essentially uses a copy of the data incoming to a listener to digitally estimate the echo that should return on the outgoing line. Having calculated the estimate, the echo canceller subtracts the echo estimate from the outgoing signal such that the echo cancels out.
An example of the problem of echo occurs in telephonic transmissions. In most cases, a phone conversation is transmitted between terminating equipment (TE) and a hybrid transformer circuit over a pair of unidirectional 2-wire lines (i.e., over four wires), and then from the hybrid circuit over a bidirectional 2-wire line. Thus, the junction between the two types of lines is implemented by the hybrid transformer. Since hybrid transformers are balanced for an average line impedance, they do not perfectly separate the two unidirectional paths from each other, and therefore they create echo signals. Moreover, if a delay is introduced in the four wire path (as can occur for satellite transmission or for digital encoding), the echos must be canceled to ensure better speech quality.
Simply speaking, echo cancellers typically employ an adaptive finite impulse response (FIR) digital filter; a cancelation processor for controlling the FIR; a subtractor; a near-end speech detector; and, a non-linear processor. The FIR receives the copy of the data (as it is successively sampled) which is transmitted from the far end on an incoming communications path to the near end. The FIR generates an estimate of the echo which would, unless canceled, be reflected back from the near end to the far end on an outgoing communications path. At the appropriate time, the FIR's estimate of the echo is subtracted by the subtractor from the signal on the outgoing communications path in an attempt to cancel out the echo. In generating its estimate of the echo, the FIR is controlled by the cancelation processor. In controlling the FIR the cancellation processor takes into consideration the signal output from the subtractor as well as any indication from the near-end speech detector that double-talk is occurring (e.g., that both parties at the far and near end are talking). The non-linear processor attempts to suppress any remaining amount of echo which the FIR is unable to cancel.
The FIR is a transversal filter with a number of taps and a corresponding number of coefficients. A tap is a unit of delay time equal to the sampling time or sampling rate. The coefficients are values (stored in registers) which are multiplied by the input signal in order to obtain the echo estimate. The cancellation processor executes an algorithm for adapting (e.g., modifying or updating) the filter coefficients, so that the filter coefficients converge to optimum (or near optimum) values faster than the echo response characteristics change and thereby enable cancellation of the echo. See, for example, U.S. patent application Ser. No. 5,793,801 of Antoni Fertner, entitled "FREQUENCY DOMAIN SIGNAL RECONSTRUCTION IN SAMPLED DIGITAL COMMUNICATIONS SYSTEMS, which is commonly assigned herewith and incorporated herein by reference.
In most echo cancelers such adaptation does not occur while the near-end speech detector detects the double-talk condition. The length of the FIR (number of taps) and the rate at which the coefficients must be updated depends on the type of service, the path (e.g., line) characteristics, and the distance of the echo source from the canceller.
Operation of a prior art echo canceller typically involves an estimation of the entire echo path response. The typical echo path response is formed by a "pure delay" element and a "tail delay". The pure delay is the actual propagation time taken by the signal from its source (e.g., the echo canceller) to a hybrid and backwards. The "tail delay", on the other hand, is the response of the hybrid circuit which terminates the four-wire line and performs impedance matching.
Not all of the echo path response is relevant to the calculations of an echo canceller. The pure delay element and any portion coming after the tail delay is not relevant and accordingly need not be involved in the adaptive calculations of the echo canceller.
Since an echo canceller's complexity is related to the number of filter taps it uses, the reduction of the number of these filter taps is important for optimization of filter operation. In order to minimize the echo canceller's calculations, an estimate of the echo path delay needs to be calculated such that the actual number of required taps may be determined. Therefore, a method of determining the duration of these portions of the echo path response is necessary to optimize an echo canceller.
U.S. Pat. No. 4,736,414 to Montagna performs a search on the coefficients of the adaptive filter to find the maximum absolute value, corresponding to the peak of the echo path response. According to the Montagna technique (illustrated in FIG. 8), assuming that the maximum value is found at coefficient or filter tap W.sub.MAX, a value W is calculated by subtracting a fixed integer from W.sub.MAX. Assuming that the hybrid response lasts N samples (or taps) and given the hybrid response start as W, then the end of the relevant portion of the impulse response is W.sub.MAX +N-1. This provides the boundaries for the segment T2, which is the only portion of the echo path required for echo cancellation. Once this is established, the adaptive filter echo canceller operates on interval T2, and will only use interval T1 as pure delay.
However, a problem with the technique described above is its assumption that W.sub.MAX lies a fixed integer amount of samples from the start of the hybrid response, as is illustrated in FIG. 9. When this assumption is not applicable to a certain system, there is an erroneous echo path calculation, causing the filter to diverge and disrupt the communication. Therefore it is necessary in implementing this technique that there be a calibration to the type of line characteristics of each application.
Other attempts have been made to operate an echo canceller with less than a total number of available filter taps. U.S. Pat. No. 4,751,730 to Galand et al. determines a range of coefficients needed to operate a cancellation filter by measuring energies of incoming and outgoing signals, and then comparing the ratio of the energies to a predetermined threshold to generate flag information which is used to control a switch on the echo path. U.S. Pat. No. 5,473,686 to Virdee continually modifies the length (or number of taps) of a adaptive FIR filter by selecting a trial number of samples, operating the filter for a sufficient length of time to allow the tap weights in the filter to stabilize, examining tap weights to determine whether the taps at the end of the filter contribute to the echo estimate, and (if necessary) increasing or decreasing the number of filter-utilized taps.
What is needed is method and apparatus for accurately determining echo path delay, as well as for accurately determining an appropriate number of taps to utilize for a FIR filter of an echo canceller.